package com.fz.us.oa.core.service.com.impl;

import com.fz.us.admin.company.dao.BaseFlowDao;
import com.fz.us.admin.company.service.impl.BaseFlowServiceImpl;
import com.fz.us.admin.dict.entity.DictItem;
import com.fz.us.oa.core.dao.com.ResidentDao;
import com.fz.us.oa.core.entity.com.Resident;
import com.fz.us.oa.core.service.com.ResidentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by dzw on 2018/3/13.
 */
@Service
public class ResidentServiceImpl extends BaseFlowServiceImpl<Resident,String> implements ResidentService {

    @Autowired
    private ResidentDao residentDao;

    @Override
    public BaseFlowDao<Resident, String> getBaseFlowDao() {
        return residentDao;
    }

    @Override
    public Resident getByName(String residentName) {
        return residentDao.getByName(residentName);
    }

    @Override
    public List<Resident> getResidentByStreet(DictItem street) {
        return residentDao.getResidentByStreet(street);
    }

    @Override
    public DictItem getStreetByNo(int streetNo) {
        return residentDao.getStreetByNo(streetNo);
    }
}
